<template>
  <div>
    <i class="el-icon-edit-outline" style="font-size: 20px;" @click="to" />
    <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
  </div>
</template>
<script>
import eForm from './form'

export default {
  components: { eForm },
  props: {
    data: {
      type: Object,
      required: true
    },
    sup_this: {
      type: Object,
      required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form = {
        id: this.data.id,
        type: this.data.type,
        title: this.data.title,
        content: this.data.content,
        description: this.data.description,
        thumbnail: this.data.thumbnail
      }
      _this.content[this.data.type] = this.data.content
      console.log(_this.form)
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
